import React, { Component } from 'react'
import Modal from "./Modal"
export default class App extends Component {
  // constructor(props){
  //   super(props)
    
  // }

  state={
    show:false
  }
  handleClick=()=>{
    this.setState({
      show:!this.state.show
    })
   
  }
  hClose=()=>{
    this.setState({
      show:false
    })
  }
  render() {
    return (
      <div>
        <button onClick={this.handleClick}>显示弹窗</button>
        <Modal show={this.state.show} close={this.hClose}></Modal>
      </div>
    )
  }
}
